// import React, { lazy } from "react";
import { Navigate } from "react-router-dom";
import Login from "../views/login";
import TodoList from "../views/todoList";
// 路由守卫
import AuthRoute from "../components/AuthRouter";

const routes = [
  {
    path: "/",
    element: <Navigate to="/login" />,
  },
  {
    path: "/login",
    element: <Login />,
  },
  {
    path: "/todoList",
    element: (
      <AuthRoute>
        <TodoList />
      </AuthRoute>
    ),
  },
];

export default routes;
